package com.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 预订表
 * </p>
 *
 * @author
 *
 */
@Getter
@Setter
@ApiModel(value = "Bookings对象", description = "预订表")
public class Bookings implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户ID")
    private Integer userId;

    @ApiModelProperty("民宿ID")
    private Integer homestayId;

    @ApiModelProperty("入住日期")
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startDate;

    @ApiModelProperty("退房日期")
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDate;

    private String name;
    private String password;

    @ApiModelProperty("入住天数")
    private Integer days;

    @ApiModelProperty("总价")
    private Integer totalPrice;

    @ApiModelProperty("状态：待支付、已确认、已完成、已取消")
    private String status;

    @ApiModelProperty("联系人姓名")
    private String contactName;

    @ApiModelProperty("联系人电话")
    private String contactPhone;

    @ApiModelProperty("入住人数")
    private Integer guestCount;

    @ApiModelProperty("备注")
    private String notes;

    @ApiModelProperty("取消原因")
    private String cancelReason;

    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;


}
